<%--
  Created by IntelliJ IDEA.
  User: 五月
  Date: 2020/8/4 0004
  Time: 10:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://shiro.apache.org/tags" prefix="shiro"%>
<html>
<head>
    <title>主页</title>
    <link rel="stylesheet" type="text/css" href="static/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">图书管理系统</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                   <%-- <img src="http://t.cn/RCzsdCq" class="layui-nav-img">--%>
                    ${sessionScope.user.username}
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="./logout">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <shiro:hasRole name="admin">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;"><i class="layui-icon">&#xe663;</i>&nbsp;&nbsp;&nbsp;图书管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="./bookList.html">所有图书</a></dd>
                        <dd><a href="./forbrowList.html">借阅申请</a></dd>
                        <dd><a href="./Order.html">预定申请</a></dd>
                        <dd><a href="./handleBookList.html">处理待还</a></dd>
                        <dd><a href="./noRturnBrowList.html">未还图书</a></dd>
                    </dl>
                </li>
                </shiro:hasRole>
                <shiro:hasRole name="admin">
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe628;</i>&nbsp;&nbsp;&nbsp;系统管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="./userManagement.html">读者管理</a></dd>
                        <dd><a href="browBookLike.html">借阅偏好</a></dd>
                    </dl>
                </li>
                </shiro:hasRole>
                <shiro:hasRole name="user">
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="layui-icon">&#xe705;</i>&nbsp;&nbsp;&nbsp;图书服务</a>
                    <dl class="layui-nav-child">
                        <dd><a href="./bookList.html">所有图书</a></dd>
                        <dd><a href="./MyOrder.html">我的预定</a></dd>
                        <dd><a href="./nowBrowList.html">待还图书</a></dd>
                        <dd><a href="./beforeBrowList.html">历史借阅</a></dd>
                    </dl>
                </li>
                </shiro:hasRole>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <iframe src="index.html" id="main" width="100%" style="height: 99.9%" frameborder="0"></iframe>
    </div>
    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 虎虎图书馆
    </div>
</div>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="static/layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use(['element','jquery'], function(){
        var $=layui.jquery;
        var element = layui.element;
        $(document).ready(function(){
            $("dd>a").click(function (e) {
                e.preventDefault();
                $("#main").attr("src",$(this).attr("href"));
            });
        });
        // $("#cloud").click(function(){$("#main").html("jaosgoaighowg");});
    });
</script>
</body>
</html>
